package com.turnengine.client.local.unit;

import java.util.Collection;
import java.util.List;

import com.turnengine.client.local.faction.bean.IFaction;
import com.turnengine.client.local.group.bean.IGroup;
import com.turnengine.client.local.unit.bean.IUnit;
import com.turnengine.client.local.unit.enums.UnitMove;
import com.turnengine.client.local.unit.enums.UnitNode;
import com.turnengine.client.local.unit.enums.UnitType;

public interface IUnitCache extends Iterable<IUnit> {

	int size();

	void clear();

	boolean addUnit(IUnit unit);

	int addUnits(Collection<IUnit> units);

	boolean containsById(int id);

	boolean containsByName(String name);

	IUnit getById(int id);

	IUnit getByName(String name);

	List<IUnit> getByFactionId(int factionId);

	List<IUnit> getByFaction(IFaction faction);

	List<IUnit> getByGroupId(int groupId);

	List<IUnit> getByGroup(IGroup group);

	List<IUnit> getByType(UnitType type);

	List<IUnit> getByMove(UnitMove move);

	List<IUnit> getByNode(UnitNode node);

	List<IUnit> getAll();

}
